home *** CD-ROM | disk | FTP | other *** search
- Path: walrus.megabaud.fi!not-for-mail
- From: petrin@walrus.megabaud.fi (Petri Nordlund)
- Newsgroups: comp.sys.amiga.applications
- Subject: Re: Executive Probs with Maple
- Date: 13 Jan 1996 20:13:39 +0200
- Organization: Megabaud Oy,Helsinki,Finland
- Message-ID: <4d8soj$a8i@walrus.megabaud.fi>
- NNTP-Posting-Host: walrus.megabaud.fi
-
- W.G.J. Langeveld <wglp09@scsa1.slac.stanford.edu> writes:
- >> >Having said that, if there's a way we can make Executive happy in an upcoming
- >> >patch of (that is, if there will be one) Maple without compromising running
- >> >without Executive, then we will likely do so.
- >>
- >> Yes there is, the Maple<-->MaplePlot3D interface should be fixed so that
- >> it would work regardless of task priorities. I wonder why the MaplePlot3D
- >> task was given priority -24 in the first place?
- >
- >My guess is that Executive sets it that way. Here's why I think so.
- >I call SystemTags() with just enough parameters to run the plotter. I do not
- >specify a priority, because SystemTags is documented as setting the priority
- >to the same value as the task calling it, which is precisely what I want: I
- >want the main Maple program and the plotter to get equal CPU time. And that
- >single call to SystemTags() is all that happens. There's no task priority
- >setting anywhere else in Maple. If that's not "compatible with system legal
- >software" then I don't know what is.
-
- I have tested Executive only with Maple 1.0, may something was
- changed in later versions?
-
- >Here's my guess at what happens: Assume Maple gets started at priority 0.
- >Now, someone wants to plot something. Maple needs to do a bunch of calculations
- >before it is ready to spawn the plotter. By that time, perhaps, Executive has
- >set Maple's priority down to -24, to give other tasks (if any) a chance to
- >work. And, perhaps, Maple executes the SystemTags call for some reason not
- >at priority 0 as it otherwise would but still at priority -24. And so, the
- >base priority of the plotter becomes -24, and assuming that Executive will
- >never let any task get a priority higher than its base priority, the plotter
- >will essentially never run. If my guess is correct, then it's clearly a bug
- >in Executive: it should start tasks spawned by other tasks at the same *base*
- >priority as the parent task, not at the *current* priority of the parent task.
-
- I know this problem and in AddTask() Executive checks if the parent
- task is scheduled, and if the new task has same priority, it will be
- given the parent task's real priority. The scheduler will adjust the
- priority later, but Executive remembers correct task priorities and
- can restore them when it quits.
-
- If the MaplePlot3D task would get its priority (-24) from the
- parent task, then the parent task should also have priority -24,
- but it doesn't, it is 0.
-
- Anyway, the MaplePlot3D task gets priority -24 even without Executive.
- I tried booting without startup-sequence and then started Maple, and
- the priority was -24. The system was totally clean, no other programs,
- not even SetPatch was run.
-
- I did some testing, and when AddTask() is called, the priority in the
- task structure is already set to -24.
-
- >By the way, if a user did not run Executive, and if the user just set the
- >priority of Maple to something else, everything would continue to work:
- >the plotter would still be started up at the same priority as Maple itself,
- >if the plotter wasn't running yet. And if the plotter were already running
- >and the user set Maple's priority higher then the plotter's, then the user
- >would get the completely expected result that the plotter wouldn't run very
- >well. My answer would simply be: don't do that.
-
- But if user lowers Maple's priority below the plotter's, the plotter
- will not work anymore.
-
- --
- __
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~///~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- Petri Nordlund __/// petrin@megabaud.fi
- ---------------------------------\XX/----------------------------------
-